package com.hornsun.domain.constant.error;

/**
 * Created by 编译中... on 2018/8/4.
 */
public enum OrganizationError {
    HAVE_CHILD_NODE(10030,"有子节点"),
    HAVE_CHILD_CLIENT(10031,"有子用户");

    private Integer code;
    private String content;

    OrganizationError(Integer code ,String content){this.code=code;this.content=content;}

    public Integer getCode() {
        return code;
    }

    public String getContent() {
        return content;
    }

    public static OrganizationError organizationErrorByContent(String content) {
        for (OrganizationError organizationError : values()) {
            if (organizationError.content.equals(content)){
                return organizationError;
            }
        }
        return null;
    }
}
